package com.shixun.dds_11.mapper;

import com.github.pagehelper.Page;
import com.shixun.dds_11.dto.GoodsPageQueryDTO;
import com.shixun.dds_11.dto.GoodsSelectDTO;
import com.shixun.dds_11.entity.DdsGoods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shixun.dds_11.vo.DdsGoodsSelectVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author YSP
 * @since 2024-07-05
 */
public interface DdsGoodsMapper extends BaseMapper<DdsGoods> {

    Page<DdsGoods> pageQuery(GoodsPageQueryDTO goodsPageQueryDTO);

    @Select("select type, name, price, pic from dds_goods where name like concat('%', #{goodsName}, '%')")
    List<DdsGoodsSelectVO> select(GoodsSelectDTO goodsSelectDTO);
}
